/*
 * Rect.h
 *
 *  Created on: 2011-03-01
 *      Author: kamil
 */

#ifndef RECT_H_
#define RECT_H_

#include <iostream>
#include "Vector2d.h"

class Rect {
public:
	Rect();
	Rect(double x, double y, double w, double h);
	virtual ~Rect();

	Vector2d randomPoint() const;
	bool contains(Vector2d point) const;
	bool contains(double x, double y) const;

	friend std::ostream & operator<<(std::ostream & os, const Rect & r );

public:
	double x;
	double y;
	double w;
	double h;
};

#endif /* RECT_H_ */
